<?php

class JSCasts_URI_Query
{
	/**
	 * The name/value pairs
	 * 
	 * @var array
	 */
	private $params = array();
	
	public function __toString()
	{
		$out = '?';
		$pairGroups = array();
		
		foreach ($this->params as $name => $value) {
			$pairGroups[] = $name . '=' . $value;
		}
		
		return $out . implode('&', $pairGroups);
	}
}